package com.example.testshader;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.view.View;

public class Shader extends View{
	Paint mPaint = new Paint();
	Path mPath = new Path();
	public Shader (Context context){
		super(context);
		
		
		mPath.moveTo(100, 50);
		mPath.lineTo(100, 0);
		mPath.lineTo(100, 100);
		mPath.lineTo(0, 100);
		mPath.lineTo(0, 0);
		
	}



	protected void onDraw(Canvas canvas){
		mPaint.setColor(Color.RED);
		canvas.drawColor(Color.WHITE);
		mPaint.setTextSize(50);
		//mPaint.setShader(shader)
		
		Rect r = new Rect(); //rect?  rectf?
		r.left = 10;
		r.top = 10;
		r.right=120;
		r.bottom = 110;
		canvas.drawRect(r, mPaint);
	
	
	}
}